package com.starlink.model.dtomapper;

import com.starlink.model.domain.BannerDO;
import com.starlink.model.request.BannerRequest;
import com.starlink.model.vo.BannerVO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * @author zhanghong
 */
@Mapper(componentModel = "spring")
public interface BannerDtoMapper {

    BannerDtoMapper INSTANCE = Mappers.getMapper(BannerDtoMapper.class);

    /**
    * DO to VO
    * @param bannerDO
    * @return
    */
    BannerVO do2VO(BannerDO bannerDO);

    /**
     * request to DO
     * @param request
     * @return
     */
    BannerDO request2DO(BannerRequest request);
}
